﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Web.Configuration;

namespace iHouse.Common.Log
{
    public static class DataContextLog
    {
        private static TextWriter _instance;

        private static object syncLock = new object();

        public static TextWriter GetInstance()
        {
            if (_instance == null)
            {
                lock (syncLock)
                {
                    if (_instance == null)
                    {
                        _instance = new StreamWriter(@"C:\text.log",true);
                    }
                }
            }

            return _instance;
        }
    }
}
